import axios from "./index.js";

// 获取地址列表
export function getAddressList(id) {
  return axios.get("api/address/list", { params: { userid: id } });
}

// 添加地址
export function addAddress(data) {
  return axios.post("/api/address/add", data);
}

//修改地址  更新地址接口
export function updateAddress(data) {
  return axios.post("api/address/update", data);
}

//删除地址
export function deleteAddress(data) {
  return axios.post("api/address/delete", {
    addressid: data,
  });
}

// 查询默认地址
export function defaultAddress(data) {
  return axios.post("/api/address/defaultAddress", data);
}
